This shopping cart is built completely in javascript and will run on the client browser if JScript enabled.
The only piece of server side software that will be useful to have available is the generic "formail.pl" perlscript which can be downloaded via the web from Matt whites pages.

####################################################
# FormMail
# Created by Matt Wright
# Created 6/9/95                Last Modified 9/23/95
# Version 1.2
# I can be reach at:		mattw@misha.net
# Scripts Archive at:		http://www.worldwidemart.com/scripts/

You can adapt the one I have included (look  at it with notepad). Formail.pl should be placed in your cgi-bin directory which comes with your web space (and the permissions set by telnet 'ing into your site). I won't go into that here but there is plenty help on the web about this already. Matt's Pages have full details of its installation. This scipt is needed to automatically email the Order Form to yourself.





These cart pages should all work from disk with the exception of of the mailed order. (which will work if you are on line as it calls formail.pl) and returns a "Thanks Page" detailing the order and giving the option to hold details in a "cookie" for future visits.
The full working site is at www.mearns.org.uk/scotshop/ 
buy something and see it all work ??????????


Only two pages of "products" are included. The Crests and Legends. But these template pages can be ammended for any number of items / Pages if the same format is kept. Only items added to the cart are held in memory, with the list being purged each time an item is added / unchecked / ammended while shopping.



How it works (if your interested) is to create an array in the Parent Frame holding the items in the cart. It then maintains and manipulates this array while allowing the pages within the frames to be changed.

I built it in a way that allows pages and items to be added with ease. It does not use a server or initial client side database at all. Any page can be added to the site as long as they have the same template layout inclusive of the  code below it will work. The items being added to the Data Array when the "Increase" buttons are pressed.

In explanation :
cl  - is the item code
9.95 - is the item price
Clan_Crests - is displayed in order form
crests.htm - is the url targeted from the order form when clicking "review". Local tags (crests.htm#cl) will work with multiple items on a page.
badge.gif - item picture file (not yet utilized on the site), but still held in the Data Array.

<input type=button name=subbox value=subtract onclick=Loc_subitem('cl','9.95','Clan_Crests','crests.htm','badge.gif')>
<input type=text name=cl size=2><input name=addbox type=button value=increase onclick=Loc_additem('cl','9.95','Clan_Crests','crests.htm','badge.gif')>




Please feel free to change copy doctor alter to your hearts content. 
However, please give me a credit somewhere.

Regards


Gordon Smith

Http://www.Mearns.org.uk
Http://www.Mearns.org.uk/scotshop/
Gordon@mearns.org.uk
Upper Pitforthie Cottage,
Fordoun,
Scotland.
